const tableHeader={'background-color':'#F2F3F5','border':'none','color':'#1D2129'}
// 订单状态:：0. 代表禁用 ； 1.有效 （支付成功）；-2和 2.待确认；3.订单结束（已退押金）；4.待确认（已还电动车需人工检验）；5.（无）；6.待确认（已还电池需要人工检验）；7 冻结 ;  8.已交押金未付租金; 10 已获得企业分配天数但是未付押金
// const orderStatus={
//     '-2':'待确认',
//     '0':'禁用',
//     '1':'有效',
//     '2':'待确认',
//     '3':'订单结束',
//     '4':'待确认（已还电动车需人工检验）',
//     '5':'',
//     '6':'待确认（已还电池需要人工检验）',
//     '7':'冻结',
//     '8':'已交押金未付租金',
//     '10': '已获得企业分配天数但是未付押金'
// }
interface Column{
    key:string,
    title:string,
    dataKey:string,
    width ?:string,
    flow ?:boolean,
    sortable ?:boolean,
    filters ?:{text:string,value:string}[],
    filterMethod ?:Function
    
}
const orderStatus={
    '-2':{text:'待确认'},
    '0':{text:'禁用'},
    '1':{text:'使用中'},
    '2':{text:'待确认'},
    '3':{text:'订单结束'},
    '4':{text:'待确认（已还电动车需人工检验'},
    '5':{text:''},
    '6':{text:'待确认（已还电池需要人工检验）'},
    '7':{text:'冻结'},
    '8':{text:'已交押金未付租金'},
    '10': {text:'已获得企业分配天数但是未付押金'},
}

  const keyName={
      'all_members':'会员总数',
      'new_members':'新增会员',
      'all_vip_to_user':'企业户转散户',
      'new_orders':'新增订单',
      'new_rent_batteries':'新增借电',
      'all_change_batteries':'换电总计',
      'all_sales':'销售额'
   }
//脱敏
   const idCard=computed(()=>{
    return (value:string)=>{
       if(!value){
          return ''
       }
       return value.replace(/^(.{6})(?:\d+)(.{4})$/,"\$1******\$2")
    }
 })
   interface CusForm{
    sm:number
    md:number,
    lg:number,
    xl:number,
    title:string,
    value :string,
    inputName ?:string,
    inputPlaceholder ?:string,
    suffixTitle ?:string,
    showInput ?:boolean,
    showCader ?:boolean,
    showDatePicker ?:boolean,
    showSelect ?:boolean,
    selectStyle ?:string,
    selectList ?:{label:string,value:string}[],
    showButton ?:boolean,
    style ?:string,
    cascList ?:string[],
    date ?:string ,
    optionList ?:any,
    selected ?:string,
    datePickerStyle ?:string,
    labelWidth ?:string,
    showSingleDatePicker ?:boolean,
    singleDate ?:string,
    singleDatePickerStyle?:string,
    colStyle ?:string,
    buttonList ?:{ type ?:string,
        icon ?:string,
        plain?:boolean,
        buttonTitle ?:string}[]
}           
export {
    tableHeader,
    orderStatus,
    keyName,
    idCard
}
export type { Column ,CusForm}
